package com.example.lenovo.demo;

import android.app.ProgressDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.util.Log;

import com.example.lenovo.demo.presenter.MainMapPresenter;
import com.example.lenovo.demo.view.ifgview.IMainMapActivity;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.ViewInject;
import org.xutils.x;

@ContentView(R.layout.activity_main_map_acticity)
public class MainMapActicity extends AppCompatActivity {
    private String id;
    @ViewInject(R.id.main_map_rv)
    private RecyclerView recyclerView;
    private MainMapPresenter presenter;
    private ProgressDialog progressDialog;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        x.view().inject(this);
        id=getIntent().getStringExtra("msg");
        initView();
    }

    private void initView() {
        progressDialog=new ProgressDialog(this);
        progressDialog.setTitle("提示");
        progressDialog.setMessage("正在加载...");
        progressDialog.setCancelable(true);
        presenter=new MainMapPresenter();
        presenter.sendView(this,recyclerView,id,progressDialog);
        presenter.initData();
    }
}
